package ec.edu.cec.java.adv.archivos;

import java.io.File;

public class ComparePath {

	public static void main(String[] args) {

		Integer x = 5;

		File file1 = new File("C:/test/demo1.txt");
		File file2 = new File("C:/test/demo1.txt");
		// File file2 = new File("C:/java/demo1.txt");

		// .compareTo
		// Es posible comparar Byte, Long, Integer, etc.

		// Return Value:
		// If the Integer is equal to the argument then 0 is returned.
		// If the Integer is less than the argument then -1 is returned.
		// If the Integer is greater than the argument then 1 is returned.

		if (file1.compareTo(file2) == 0) {
			// Ambos caminos son los mismos
			System.out.println("Both paths are same!");

		} else {
			// Caminos no son los mismos
			System.out.println("Paths are not same!");
		}
		System.out.println(file1);
		
		System.out.println(x.compareTo(3));
		System.out.println(x.compareTo(5));
		System.out.println(x.compareTo(8));

	}
}
